/*
 * @Author: 星孑
 * @Date: 2022-03-10 15:49:30
 * @LastEditors: 星孑
 * @LastEditTime: 2022-04-09 15:09:54
 * @FilePath: /admin/src/utils/tools.js
 * @Description: 方法工具类
 */
import { Message } from 'element-ui'
import store from '../store'

export const hint = Message

export const hasPermission = (button) => {
  // console.log('-------------- 按钮权限: ', store.getters.buttons.includes(button))
  return store.getters.buttons.some(item => item.code === button)
}
